package cn.hznc.repository;

import cn.hznc.domain.entity.*;
import cn.hznc.domain.request.message.GetMessageReq;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.swagger.models.auth.In;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserRepository{
    public UserEntity selectbyname(String name);

    public void insert(UserEntity user);
    void updatePassword (UserEntity userEntity);

    void saveBatch(List<UserEntity> list);

   List<Integer> selectRolesByUid(@Param("uid")Integer uid);


    List<Integer> selectMenuIdByRolse( List<Integer> rolseId);


    List<MenuEntity> selectMenuByMenuId( List<Integer> menuId);


    UserEntity selectbyUserid(@Param("userId") Integer userId);

    UserEntity selectbyUseridReload(@Param("userId") Integer userId);



    List<RolesEntity> selectRoles (@Param("pageNum")Integer pageNum, @Param("pageSize") Integer pageSize);

    void deleteByUserId(Integer userId);


    List<MessageEntity> selectUserMessage(GetMessageReq getMessageReq);

    List<String> selectRolesByUId(@Param("userId") Integer userId);

    List<Integer> selectTypes(@Param("rolses") List<String> rolses , @Param("messageType")Integer messageType);

    String getEmployeeNameByUserName(@Param("userId") Integer userId);

    List<Integer> selectMessageTypeByRoles(@Param("roles") List<String> roles);

    List<Integer> qryMessageTypeByUserId(@Param("userId") Integer userId);

    List<EmployeeEntity> selectAllUserList();

    List<String> selectByMessageTypes(@Param("messageTypes") List<Integer> messageTypes);

    List<String> selectPermissionListByUserId(@Param("userId") Integer userId);
}
